package com.tuanzi.loan.web.lazy.credithousekeeper;

import com.tuanzi.loan.business.service.credithousekeeper.CreditCompensatoryWithdrawStatService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.credithousekeeper.CreditCompensatoryWithdrawStatRequest;
import com.tuanzi.loan.vo.response.credithousekeeper.CreditCompensatoryWithdrawStatResponse;
import org.springframework.data.domain.Page;

import java.io.Serializable;

/**
 * 合利宝 信用卡代偿-取现
 *
 * created by chuIllusions_tan 20180925
 */
public class CreditCompensatoryWithdrawStatLazyDataModel
        extends BaseLazyDataModel<CreditCompensatoryWithdrawStatRequest,CreditCompensatoryWithdrawStatResponse> implements Serializable{

    private static final long serialVersionUID = 1042338719016439608L;

    private CreditCompensatoryWithdrawStatService creditCompensatoryStatService = SpringContextHolder.getBean(CreditCompensatoryWithdrawStatService.class);

    public CreditCompensatoryWithdrawStatLazyDataModel(CreditCompensatoryWithdrawStatRequest creditCompensatoryOrderRequest) {
        super(creditCompensatoryOrderRequest);
    }

    @Override
    protected Page<CreditCompensatoryWithdrawStatResponse> doLoad(PageSearcher<CreditCompensatoryWithdrawStatRequest> pageSearcher) {
        return creditCompensatoryStatService.list(pageSearcher);
    }
}
